home *** CD-ROM | disk | FTP | other *** search
- #!/usr/sbin/perl
-
- print "\n";
-
- @MAKEFILE_VARS=(TITLE,FULL_TITLE,VERSION,BOOKSHELF,BOOK_ICON,BOOK_LANG,DTD,SORT_ORDER,HIDDEN);
- open(MAKEFILE,"Makefile");
- foreach $MAKE_VAR (@MAKEFILE_VARS) {
- while ($MAKE_LINE = <MAKEFILE>) {
- if (grep(/^\s*($MAKE_VAR)/,$MAKE_LINE)) {
- print "$MAKE_LINE";
- if ($MAKE_VAR eq "VERSION") {
- if ( ${MAKE_LINE} !~ /^\s*VERSION\s*=\s*\d{3}-\d{4}-\d{3}(,\s*\d+\/\d+\s*)?$/ ) {
- print " WARNING: VERSION string does not use standard partnumbering format:\n\n xxx-xxxx-xxx[, xx/xx]\n\n";
- }
- else {
- ($PARTNUM = $MAKE_LINE) =~ s/^\s*VERSION\s*=\s*(\d{3}-\d{4}-\d{3}([DEFRJP]{2})?)(,\s*\d+\/\d+\s*)?\n/$1/;
- $CWD_PATH = `pwd`;
- ($CWD = $CWD_PATH) =~ s/^.*\/([^\/]+)/$1/;
- chop $CWD;
- if ( $PARTNUM ne $CWD ) {
- print " WARNING: VERSION string $PARTNUM does not match dir $CWD\n";
- }
- }
- }
- last;
- }
- }
- if (eof) {
- print "$MAKE_VAR is undefined";
- if ($MAKE_VAR eq "BOOKSHELF") {
- print "; default is \"SGI_EndUser\"\n"; }
- elsif ($MAKE_VAR eq "BOOK_ICON") {
- print "; default is \"generic\"\n"; }
- elsif ($MAKE_VAR eq "BOOK_LANG") {
- print "; default is \"C\"\n"; }
- elsif ($MAKE_VAR eq "DTD") {
- print "; default is \"SGIDOC\"\n"; }
- elsif ($MAKE_VAR eq "SORT_ORDER") {
- print "; default is \"\"\n Note: this is appropriate except for a few special cases\n"; }
- elsif ($MAKE_VAR eq "HIDDEN") {
- print "; default is \"FALSE\"\n"; }
- else {
- print "\n"; }
- }
- seek(MAKEFILE,0,0);
- }
- print "\n";
-